/*
 * @Author: zjj
 * @Date: 2019-12-24 15:15:52
 * @LastEditors  : zjj
 * @LastEditTime : 2020-01-03 14:49:23
 */
export const throttle=(fn,time)=> {
    let timer
    console.log("timer",timer)
    return function(){
        let context=this
        let arg=arguments
        if(timer){
            return
        }
        timer=setTimeout(function(){
            fn.apply(context,arg)
            timer=null
        },time)
    }
}
